<?php

namespace Api;

use Log;
use RuntimeException;

class ExtException extends RuntimeException {

    public function __construct(string $message = '', string $debugMessage = '', int $code = 0)
    {
        if (env('APP_DEBUG', false)) {
            Log::debug(get_class($this).'：'.$message.'：'.$debugMessage);
        }
        parent::__construct($message, $code);
    }

}